package demo02ClassObj;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:咭咭熊
 * Date:2021 - 09 - 13
 * Time:15:37
 */
//如果全是静态的，静态的会先执行并且与执行顺序有关；
public class Test {
    static int cnt = 6;
    static {//静态代码块
        cnt += 9;//执行1:15
    }

    public static void main(String[] args) {
        System.out.println("cnt = " + cnt);//执行3:5
    }
    static {
        cnt /= 3;//执行2:5
    }
}
